/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tugas_4_pegawai_.soft_developer;
import Jabatan.*;
import Pegawai.*;
/**
 *
 * @author Liem
 */
public class Tugas_4_Pegawai_Soft_Developer {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        jabatan programmer = new programmer();
        pegawai Bona = new pegawai("Bona",programmer);
        pegawai Rongrong = new pegawai("Rongrong",programmer);
        pegawai Oky = new pegawai("Oky",programmer);
        
        jabatan sales = new sales();
        pegawai Nirmala = new pegawai("Nirmala",sales);
        pegawai Putri = new pegawai("Putri",sales);
        
        jabatan manager = new manager();
        pegawai Upik = new pegawai("Upik",manager);
        
        
    pegawai[] daftarPegawai = new pegawai[6];
         daftarPegawai[0] = Bona;
         daftarPegawai[1] = Rongrong;
         daftarPegawai[2] = Oky;
         daftarPegawai[3] = Nirmala;
         daftarPegawai[4] = Putri;
         daftarPegawai[5] = Upik;
    
    for(int i=0;i<6;i++){
    System.out.println("Nama Pegawai    : " + daftarPegawai[i].getNama());    
    System.out.println("Jabatan Pegawai : " + daftarPegawai[i].getJabatan().getNamaJabatan());
    daftarPegawai[i].getJabatan().tampilGaji();
    System.out.println();
    }
}
}
